//
//  HEEnums.h
//  HealthElderly
//
//  Created by 吴欧 on 2020/10/28.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import <Foundation/Foundation.h>


#define KWxPayCode @"wechatpay"
#define KAliPayCode @"alipay"
#define KQRPayCode @"scanpay"
#define KAppSource 2            /// 主要用于支付，所属应用账户平台编号
#define KPayPlatform @"1005"    /// 主要用于支付，发起支付的应用平台编号

NS_ASSUME_NONNULL_BEGIN

/*`channel` int(11) DEFAULT NULL COMMENT '1.居家检测 2.脊柱康复 3.居家照料 4.线下活动 5.报告解读 6.私人医生 7.健康规划 8.体检服务 9.特需食品 10.健康辅具 11.申请加号 12.图文问诊 13.我的服务包 14.医生团队 15.居家医养',
*/
/**
 商品详请
 */
typedef NS_ENUM(NSInteger, HEChannelType) {
    HEChannelTypeHomeCheck = 1,
    HEChannelTypeSpinalReh = 2,
    HEChannelTypeHomeCare = 3,
    HEChannelTypeOfflineActive = 4,
    HEChannelTypeHealthGuide = 5,
    HEChannelTypePrivateDoctors = 6,
    HEChannelTypeHealthPlan = 7,
    HEChannelTypeBodyCheck = 8,
    HEChannelTypeSpecialFood = 9,
    HEChannelTypeHealthAids = 10,
    HEChannelTypeApplyPlus = 11,
    HEChannelTypePTConsultation = 12,
    HEChannelTypeServicePack = 13,
    HEChannelTypeDoctorTeam = 14,
    HEChannelTypeSickedBed = 15,
};


/**
 订单类型
 orderType 1 普通订单 2 秒杀订单 3 团购订单 4 拼团订单 5 积分订单
 */
typedef NS_ENUM(NSInteger, HEOrderType) {
    HEOrderTypeGeneral = 1,
};

/**
 订单来源
 */
typedef NS_ENUM(NSInteger, HEOrderSourceType) {
    HEOrderSourceTypeMin = 1,
    HEOrderSourceTypeH5 = 2,
    HEOrderSourceTypePc = 3,
    HEOrderSourceTypeAndroid = 4,
    HEOrderSourceTypeiOS = 5,
};

/**
选择支付方式
*/
typedef NS_ENUM(NSInteger, HEPayemntType) {
    HEPayemntTypeWxPay = 1,// 微信
    HEPayemntTypeAliPay, // 支付宝
};

extern NSString * NSStringFromPayemntType(HEPayemntType state);



/**
 支付方式
 */
typedef NS_ENUM(NSInteger, HEOrderPayType) {
    HEOrderPayTypeWxPay = 1,// 微信
    HEOrderPayTypeAliPay = 2, // 支付宝
    HEOrderPayTypeBalancePay = 3, // 余额支付
    HEOrderPayTypeIntegralPay = 5, // 积分兑换
};

typedef NS_ENUM(NSInteger, HESubmitPreviewType) {
    HESubmitPreviewTypeByGoodsDetails = 1, // 从商品详请进入生成订单预览
    HESubmitPreviewTypeByCart = 2, // 从购物车生成订单预览
};


/**
 线下服务订单状态
 */
typedef NS_ENUM(NSInteger, HEOrderStatus) {
    HEOrderStatusWaitPay = 12, // 待付款
    HEOrderStatusWaitDeliver = 2, // 待发货
    HEOrderStatusDelivered = 3, // 待收货
    HEOrderStatusWaitComment = 4, // 待评价
    HEOrderStatusAfterSales = 6, // 售后中
    HEOrderStatusFinish = 5, // 已完成
    HEOrderStatusAfterSalesSuccess = 7, //
    HEOrderStatusRefuning = 13, // 退款中
    HEOrderStatusRefund = 14, // 已退款
    HEOrderStatusClosed = 15, // 已关闭 // 已取消 统一
    HEOrderStatusInvalid = 16, // 无效订单
    HEOrderStatusDeleted = 17, //  已删除
    HEOrderStatusWaitUse = 19, // 待使用  线下服务2类型
    HEOrderStatusAfterSaleOrder = 20, // 售后订单
    HEOrderStatusVerification = 21, // 订单核销
};


/**
 线下服务订单状态
 */
typedef NS_ENUM(NSInteger, HEOrderWelfareStatus) {
    HEOrderWelfareStatusNotStart = 0,// 未开始
    HEOrderWelfareStatusWaitAssign = 1,// 待指派
    HEOrderWelfareStatusWaitAccept = 2, // 待接单
    HEOrderWelfareStatusWaitWelfare = 3, // 待服务
    HEOrderWelfareStatusInWelfare = 4, // 服务中
    HEOrderWelfareStatusToBeConfirm = 5, // 待确认
    HEOrderWelfareStatusFinish = 6, // 已完成
    HEOrderWelfareStatusEvaluated = 7, // 已评价
    HEOrderWelfareStatusCanceled = 11, // 已取消
    HEOrderWelfareStatusStartServer = 12, // 开始服务
    HEOrderWelfareStatusAutoRefurn = 33, // 已退款
};

/**
 退款状态
 */
typedef NS_ENUM(NSInteger, HEOrderRefuseStatus) {
    HEOrderRefuseStatusWaitDeal = 1,// 待处理
    HEOrderRefuseStatusWaitMerchComfire, // 等待卖家确认退款
    HEOrderRefuseStatusWaitSellerReture, // 等待买家退货
    HEOrderRefuseStatusWaitMerchComfireGoods, // 等待卖家确认收货
    HEOrderRefuseStatusRefusing, // 退款中
    HEOrderRefuseStatusFinish, // 已完成
    HEOrderRefuseStatusRefused, // 已拒绝
    HEOrderRefuseStatusForeverRefuse, // 已永久拒绝
    HEOrderRefuseStatusCancel, // 取消售后
};

/**
 物流状态
 */
typedef NS_ENUM(NSInteger, HELogisticStatus) {
    HELogisticStatusError, // 物流异常
    HELogisticStatusTransport = 2,// 运输中
    HELogisticStatusHasSign = 3,// 已签收
};


/**
 商品售后按钮显示状态
 */
typedef NS_ENUM(NSInteger, HEOrderGoodsOperationType) {
    HEOrderGoodsOperationTypeCancelApply = 1, // 取消售后
    HEOrderGoodsOperationTypeApplySales = 2, // 申请售后
    HEOrderGoodsOperationTypeFill = 3, // 填写
};

/**
 售后申请类型
 */
typedef NS_ENUM(NSInteger, HEOrderAfterSalesType) {
    HEOrderAfterSalesTypeExchangeGoods = 0, // 换货
    HEOrderAfterSalesTypeRefund = 1, // 退钱
    HEOrderAfterSalesTypeReturnGoods, // 退货
    HEOrderAfterSalesTypeReturnMoneyAndGoods, // 退钱退货
};

/**
 售后申请类型
 */
typedef NS_ENUM(NSInteger, HESysInfoType) {
    HESysInfoTypeEXAM = 0, // 体检报告
    HESysInfoTypeKIT, // 检测报告
    HESysInfoTypeSYSTEM, // 系统消息
    HESysInfoTypeACTIVITY, // 活动
    HESysInfoTypeSYS_NOTIFY, // 系统提醒
    HESysInfoTypeNOTIFY, // 用户提醒
    HESysInfoTypeEXPRESS, // 快递
    HESysInfoTypeHEALTH, // 脊柱健康
    HESysInfoTypeSUGGEST, // 投诉与建议
    HESysInfoTypeDOCTOR, // 图文问诊消息
    HESysInfoTypeADD_NUM, // 加号付款
    HESysInfoTypePLAN, // 健康规划单
    HESysInfoTypeGUIDE, // 健康指导
    HESysInfoTypeProxyPay, // 代付消息
};

#pragma mark - 图文问诊消息类型
static NSString  * const TWIM_TEXT = @"text";
static NSString  * const TWIM_IMAGE = @"image";
static NSString  * const TWIM_VIDEO = @"video";
static NSString  * const TWIM_AUDIO = @"audio";


#pragma mark - 扫码
static NSString  * const CODE_OLDMAN = @"oldman://";
static NSString  * const CODE_HG = @"HG://";
static NSString  * const CODE_ORDER = @"order://";

/// 居家医养
static NSString  * const SCHEME_SICKBED = @"jtbc";

/// 医生团队
static NSString  * const SCHEME_DOC_TEAM = @"ystd";

/// 居家照料
static NSString  * const SCHEME_HOME_CARE = @"jjzl";

/// 护理服务
static NSString  * const SCHEME_SERVER_CARE = @"hlsm";

#pragma mark - 唤起APP
/// 扫码iptv -> h5  ->  唤起APP
static NSString  * const SCHEME_IPTV = @"iptv";

@interface HEEnums : NSObject

+ (NSString *)refundStatusToText:(NSInteger)status;

+ (NSString *)welfareStatusToText:(NSInteger)status;

+ (NSString *)orderStatusToText:(NSInteger)status;

+ (NSString *)logisticStatusToText:(NSString *)status;

+ (HESysInfoType)sysInfoTypeToEnum:(NSString *)status;

+ (NSString *)sysInfoTypeToText:(NSString *)status;

+ (NSString *)sexToText:(NSInteger)sex;

+ (NSInteger)sexToCode:(NSString *)text;

/// 打折商品指定类型
+ (NSString *)activeGoodToText:(NSInteger)status;

/// 团队服务状态
+ (NSString *)teamStateToText:(NSInteger)status;

/// 图文问诊状态
+ (NSString *)twStateToText:(NSInteger)status;

/// 健康规划复诊时间单位
+ (NSString *)visitUnitToText:(NSInteger)status;

/// 加号申请状态
+ (NSString *)applyToText:(NSInteger)status;


/// 健康指标数据异常状态
+ (NSString *)indicatorsStateToText:(NSInteger)status;

@end

NS_ASSUME_NONNULL_END
